// $Id: networkminsharealloc.h 54 2004-10-11 15:31:22Z jonas $
#ifndef NETWORKMINSHAREALLOC_H
#define NETWORKMINSHAREALLOC_H

#include "network.h"

/**
 * Here is a far better implementation of transfers than the naive and constant ones, but it always unersetimates the possible speeds. It transfers with the greatest common divider you might say. A nodes maximum upload speed per transfer is calculated by dividing its maximum possible speed
 */
class NetworkMinShareAlloc : public Network {
public:
	NetworkMinShareAlloc(list<Node *> *);
	~NetworkMinShareAlloc();

	void transfer();

private:
	void transferChain(Node *, Transfer *);

	map<Node *, int> m_nodesTransfersIn;
};

#endif
